Golang - 條件式與迴圈



if-else

if condition {
    ...
} else {
    ...
}

switch

switch condition {
case c1:
    ...
case c2:
    ...
default:
    ...
}

for

for i := 0; i < count; i++ {
    ...
}

while

for {
    ...
}
#golang #GO







你可能感興趣的文章

[Day 2] JS in Pipeline (2): Docker and Local Development Environment (2)

[Day 2] JS in Pipeline (2): Docker and Local Development Environment (2)

HTML 基礎

HTML 基礎

深入學習 LSD-SLAM - 4

深入學習 LSD-SLAM - 4






留言討論